package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FaEsmRequirementsMapper;
import com.ruoyi.system.domain.FaEsmRequirements;
import com.ruoyi.system.service.IFaEsmRequirementsService;

/**
 * 需求记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-13
 */
@Service
public class FaEsmRequirementsServiceImpl implements IFaEsmRequirementsService 
{
    @Autowired
    private FaEsmRequirementsMapper faEsmRequirementsMapper;

    /**
     * 查询需求记录
     * 
     * @param id 需求记录主键
     * @return 需求记录
     */
    @Override
    public FaEsmRequirements selectFaEsmRequirementsById(Long id)
    {
        return faEsmRequirementsMapper.selectFaEsmRequirementsById(id);
    }

    /**
     * 查询需求记录列表
     * 
     * @param faEsmRequirements 需求记录
     * @return 需求记录
     */
    @Override
    public List<FaEsmRequirements> selectFaEsmRequirementsList(FaEsmRequirements faEsmRequirements)
    {
        return faEsmRequirementsMapper.selectFaEsmRequirementsList(faEsmRequirements);
    }

    /**
     * 新增需求记录
     * 
     * @param faEsmRequirements 需求记录
     * @return 结果
     */
    @Override
    public int insertFaEsmRequirements(FaEsmRequirements faEsmRequirements)
    {
        faEsmRequirements.setCreateTime(DateUtils.getNowDate());
        return faEsmRequirementsMapper.insertFaEsmRequirements(faEsmRequirements);
    }

    /**
     * 修改需求记录
     * 
     * @param faEsmRequirements 需求记录
     * @return 结果
     */
    @Override
    public int updateFaEsmRequirements(FaEsmRequirements faEsmRequirements)
    {
        faEsmRequirements.setUpdateTime(DateUtils.getNowDate());
        return faEsmRequirementsMapper.updateFaEsmRequirements(faEsmRequirements);
    }

    /**
     * 批量删除需求记录
     * 
     * @param ids 需要删除的需求记录主键
     * @return 结果
     */
    @Override
    public int deleteFaEsmRequirementsByIds(Long[] ids)
    {
        return faEsmRequirementsMapper.deleteFaEsmRequirementsByIds(ids);
    }

    /**
     * 删除需求记录信息
     * 
     * @param id 需求记录主键
     * @return 结果
     */
    @Override
    public int deleteFaEsmRequirementsById(Long id)
    {
        return faEsmRequirementsMapper.deleteFaEsmRequirementsById(id);
    }
}
